package coder.nav.controller;

import coder.nav.common.R;
import coder.nav.model.bo.NavFanyiBO;
import coder.nav.model.vo.NavFanyiVO;
import coder.nav.model.vo.NavListVO;
import coder.nav.service.NavListService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Api(tags = "导航列表")
@RestController
@RequestMapping("/nav")
public class NavListController {

    @Autowired
    private NavListService listService;

    @ApiOperation("导航列表")
    @GetMapping("/getList")
    public R<List<NavListVO>> getList() {
        return new R<>(listService.getList());
    }

    @ApiOperation("翻译接口")
    @PostMapping("/getFanyiResult")
    public R<NavFanyiVO> getFanyiResult(@RequestBody NavFanyiBO bo) {
        return new R<>(listService.getFanyiResult(bo));
    }

}
